package com.bawei.mall.product.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.product.domain.MallProductLove;
import com.bawei.mall.product.service.MallProductLoveServie;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/love")
public class MallProductLoveController {
    @Autowired
    private MallProductLoveServie mallProductLoveServie;




    @PostMapping("/addLove")
    public R addLove(@RequestBody MallProductLove mallProductLove){
        mallProductLoveServie.addLove(mallProductLove);
        return R.ok();
    }

    @GetMapping("/del")
    public R del(@RequestParam Integer id){
        mallProductLoveServie.del(id);
        return R.ok();
    }

}
